  <template>
  <div>
    <el-pagination
      background
      @current-change="currentPage"
      :current-page="pages.page"
      :page-size="pages.count"
      layout="prev, pager, next"
      :total="total"
    ></el-pagination>
  </div>
</template>
  
  <script>
export default {
  props:{
    total:{
      type:Number,
      required:true
    },
    pages:{
      type:Object,
      required:true
    }
  },
  data() {
    return {
    }
  },
  methods:{
    currentPage(newPage){
      this.$emit("currentPage",newPage)
    }
  }
};
</script>
  
<style lang="less" scoped>
.el-pagination{
  margin-top: 30px;
}
</style>